]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Include panel corners in startup animation
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 3 Mar 2011 16:25:30 +0000 (17:25 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 3 Mar 2011 21:56:38 +0000 (22:56 +0100)
Commit b1654af4063 moved the panel positioning (and thus that of its
corners) before the panel startup animation. As the panel corners now
are mapped while the panel animation is active, the initial style-changed
signal which triggers another repositioning is received after the
initial layout and the corners end up at wrong positions.
To fix, animate the corner positions as well during the startup
animation - if anyone could actually see the animation, the corners
should animate with the panel anyway ...

https://bugzilla.gnome.org/show_bug.cgi?id=643804

js/ui/panel.js

index 37a720e1f8fb2def8ddb114eb51d4001ddbc3fae..95dc2bcac63c6c2d7c78296eef77216b4d9b63cf 100644 (file)
@@ -1051,6 +1051,20 @@ Panel.prototype = {
                            time: STARTUP_ANIMATION_TIME,
                            transition: 'easeOutQuad'
                          });
+
+        let oldCornerY = this._leftCorner.actor.y;
+        this._leftCorner.actor.y = oldCornerY - this.actor.height;
+        this._rightCorner.actor.y = oldCornerY - this.actor.height;
+        Tweener.addTween(this._leftCorner.actor,
+                         { y: oldCornerY,
+                           time: STARTUP_ANIMATION_TIME,
+                           transition: 'easeOutQuad'
+                         });
+        Tweener.addTween(this._rightCorner.actor,
+                         { y: oldCornerY,
+                           time: STARTUP_ANIMATION_TIME,
+                           transition: 'easeOutQuad'
+                         });
     },
 
     relayout: function() {